package com.servingcloud.servera.api.service;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.servingcloud.common.model.RestPage;
import com.servingcloud.common.model.RestResult;
import com.servingcloud.servera.api.common.MFeignConfig;
import com.servingcloud.servera.api.models.request.UserInfoModifyReq;
import com.servingcloud.servera.api.models.request.UserInfoQueryReq;
import com.servingcloud.servera.api.models.request.UserInfoSaveReq;
import com.servingcloud.servera.api.models.response.UserInfoRes;
import com.servingcloud.servera.api.service.fallback.UserInfoFallback;

@FeignClient(name = "servera",fallback = UserInfoFallback.class, configuration = MFeignConfig.class)
public interface UserInfoService {
	// 这是被请求微服务的地址，也就是servera的地址
	@RequestMapping(value = "/userInfoApi/findUserInfoPage", method = RequestMethod.POST)
	public RestResult<RestPage<UserInfoRes>> findUserInfoPage(@RequestBody UserInfoQueryReq param);
	@RequestMapping(value = "/userInfoApi/saveUserInfo", method = RequestMethod.POST)
	public RestResult<Long> saveUserInfo(@RequestBody UserInfoSaveReq param);
	@RequestMapping(value = "/userInfoApi/modifyUserInfo", method = RequestMethod.POST)
	public RestResult<Object> modifyUserInfo(@RequestBody UserInfoModifyReq param);
	@RequestMapping(value = "/userInfoApi/deleteUserInfo", method = RequestMethod.POST)
	public RestResult<Object> deleteUserInfo(@RequestBody UserInfoModifyReq param);
}